package com.ruoyi.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * ygabc_borrow对象 ygabc_borrow
 *
 * @author ruoyi
 * @date 2022-06-15
 */
public class YgabcBorrow extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    /**
     * 图书
     */
    @Excel(name = "图书")
    private String bookId;
    private String bookName;

    /**
     * 书名
     */
    @Excel(name = "书名")
    private YgabcBookInfo bookInfo;

    /**
     * 借书人
     */
    @Excel(name = "借书人")
    private String userId;
    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 借书时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "借书时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date borrowTime;

    /**
     * 还书时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "还书时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date returnTime;

    /**
     * 图书状态
     */
    @Excel(name = "图书状态")
    private Long status;

    /**
     * 用户
     */
    @Excel(name = "用户")
    private SysUser user;

    /**
     * 用户角色
     */
    @Excel(name = "用户角色")
    private SysUserRole userRole;

    /**
     * 角色
     */
    @Excel(name = "角色")
    private SysRole role;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getBookId() {
        return bookId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }

    public void setBorrowTime(Date borrowTime) {
        this.borrowTime = borrowTime;
    }

    public Date getBorrowTime() {
        return borrowTime;
    }

    public void setReturnTime(Date returnTime) {
        this.returnTime = returnTime;
    }

    public Date getReturnTime() {
        return returnTime;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public SysUserRole getUserRole() {
        return userRole;
    }

    public void setUserRole(SysUserRole userRole) {
        this.userRole = userRole;
    }

    public SysRole getRole() {
        return role;
    }

    public void setRole(SysRole role) {
        this.role = role;
    }

    public SysUser getUser() {
        return user;
    }

    public void setUser(SysUser user) {
        this.user = user;
    }

    public YgabcBookInfo getBookInfo() {
        return bookInfo;
    }

    public void setBookInfo(YgabcBookInfo bookInfo) {
        this.bookInfo = bookInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("bookId", getBookId())
                .append("userId", getUserId())
                .append("borrowTime", getBorrowTime())
                .append("returnTime", getReturnTime())
                .append("status", getStatus())
                .append("user", getUser())
                .append("userRole", getUserRole())
                .append("role", getRole())
                .append("bookInfo", getBookInfo())
                .toString();
    }
}
